﻿@{
    Layout = null;
}

<!DOCTYPE html>

<html>
<head>
    <meta name="viewport" content="width=device-width" />
    <title>资料信息</title>
    <link href="~/Scripts/jquery-easyui-1.5.4/themes/bootstrap/easyui.css" rel="stylesheet" />
    <script src="~/Scripts/jquery-easyui-1.5.4/jquery.min.js"></script>
    <script src="~/Scripts/jquery-easyui-1.5.4/jquery.easyui.min.js"></script>
    <script src="~/Scripts/jquery-easyui-1.5.4/locale/easyui-lang-zh_CN.js"></script>
    <link href="~/Content/themes/icon.css" rel="stylesheet" />
    <script src="~/Content/js/common.js"></script>
    <link href="~/Content/themes/table.css" rel="stylesheet" />
    <style>
        .datagrid-btable .datagrid-row-selected {
            color: #0094ff !important;
        }
    </style>
    <script type="text/javascript">
        $(function () {
            $.ajax({     //请求当前用户可以操作的按钮
                url: "/Button/GetUserAuthorizeButton?r=" + Math.random(),
                type: "post",
                data: { "KeyCode": "Document", "KeyName": "Document" },
                dataType: "json",
                timeout: 5000,
                success: function (data) {
                    var oldSelectRoleId;   //上次点选的DocumentId
                    if (data.success) {
                        var toolbar = getToolBar(data);      //common.js
                        if (data.search) {     //判断是否有浏览权限
                            $("#ui_Document_dg").datagrid({
                                url: "/Document/GetAllDocumentList",
                                striped: true, rownumbers: true, pagination: true, pageSize: 20, singleSelect: true,
                                idField: 'DocumentId',
                                fit: true,
                                fitColumns: false,
                                //sortName: 'UpdateTime',
                                //sortOrder: 'desc',
                                pageList: [20, 40, 60, 80, 100],
                                columns: [[
                                                 { width: 100, title: '资料类型', field: 'DocumentTypeName' },
                                                 { width: 100, title: '资料名称', field: 'DocumentName' },
                                                 { width: 100, title: '保密', field: 'IsSecrecy' },
                                                 {
                                                     width: 150, title: '上传时间', field: 'AddTime', formatter: function (date) {
                                                         var pa = /.*\((.*)\)/;
                                                         var unixtime = date.match(pa)[1].substring(0, 10);
                                                         return getTime(unixtime);
                                                     }
                                                 },
                                                 {
                                                     field: 'DownloadUrl', title: '操作', width: 150,
                                                     formatter: function (data) {
                                                         var str = '<a href="' + data + '" name="opera" class="easyui-linkbutton" >下载</a>';
                                                         return str;
                                                     }
                                                 }
                                ]],
                                toolbar: toolbar.length == 0 ? null : toolbar,
                                onSelect: function (rowIndex, rowData) {
                                    //alert(rowData.DocumentId);
                                    //if (oldSelectRoleId == rowData.DocumentId) {
                                    //    return;
                                    //}
                                    //oldSelectRoleId = rowData.DocumentId;
                                    var $ui_Document_layout = $("#ui_Document_layout");
                                    var eastDocument = $ui_Document_layout.layout("panel", "south");
                                    if (eastDocument.panel("options").collapsed) {   //判断是否展开
                                        $ui_Document_layout.layout("expand", "south");
                                    }
                                    eastDocument.panel("setTitle", "资料关系信息");

                                    $("#ui_DocumentRelation_dg").datagrid({       //初始化datagrid
                                        url: "/Document/GetDocumentRelation?DocumentId=" + rowData.DocumentId,
                                        striped: true, rownumbers: true, pagination: true, pageSize: 20, singleSelect: true,
                                        idField: 'DRelationId',
                                        pageList: [20, 40, 60, 80, 100],
                                        toolbar: [{ text: '添加关系', iconCls: 'icon-add', handler: function () { addDocumentRelation(rowData.DocumentId); } }, '-', { text: '删除关系', iconCls: 'icon-remove', handler: function () { delDocumentRelation(); } }],
                                        columns: [[
                                             { width: 100, title: '类型', field: 'PropertyName' },
                                             { width: 100, title: '编号', field: 'ID' },
                                             { width: 100, title: '名称', field: 'Name' },
                                        ]]
                                    });

                                }
                            });
                        }
                        else {
                            $.show_alert("提示", "无权限，请联系管理员！");
                        }
                    } else {
                        $.show_alert("错误", data.result);
                    }
                },
                error: function (XMLHttpRequest, textStatus, errorThrown) {
                    if (textStatus == "timeout") {
                        $.show_alert("提示", "请求超时，请刷新当前页重试！");
                    }
                    else {
                        $.show_alert("错误", textStatus + "：" + errorThrown);
                    }
                }
            })

        });



        //添加资料信息
        function AddDocument() {
            $("<div/>").dialog({
                id: "ui_Document_add_dialog",
                href: "/Document/DocumentAdd",
                title: "添加资料信息",
                height: 570,
                width: 910,
                modal: true,
                buttons: [{
                    id: "ui_Document_add_btn",
                    text: '添 加',
                    handler: function () {
                        var IsSecrecy = "";
                        if ($("#selDocumentType").val() == '') {
                            alert('请选资料类型');
                            return false;
                        }
                        if ($("input[name='IsSecrecy']:checked").val() == '1') {
                            IsSecrecy = '1';
                        }
                        if ($("#txtPath").val() == '')
                        {

                            alert('无上传资料');


                            return;
                        }
                        $("#DocumentAddForm").form("submit", {
                            url: "/Document/DocumentInfoAdd",
                            onSubmit: function (param) {
                                param.DocumentTypeId = $('#selDocumentType').val();
                                param.DocumentName = $("#txtDocumentName").val();
                                param.Path = $("#txtPath").val();
                                param.DownloadUrl = $("#txtDownloadUrl").val();
                                param.IsSecrecy = IsSecrecy;

                                if ($(this).form('validate')) {
                                    $('#ui_Document_add_btn').linkbutton('disable');
                                    return true;
                                }
                                else {
                                    $('#ui_Document_add_btn').linkbutton('enable');   //恢复按钮
                                    return false;
                                }
                            },
                            success: function (data) {
                                var dataJson = eval('(' + data + ')');
                                if (dataJson.success) {
                                    $("#ui_Document_add_dialog").dialog('destroy');
                                    $.show_alert("提示", dataJson.msg);
                                    $("#ui_Document_dg").datagrid("reload").datagrid('clearSelections').datagrid('clearChecked');
                                } else {
                                    $('#ui_Document_add_btn').linkbutton('enable');
                                    $.show_alert("提示", dataJson.msg);
                                }
                            }
                        });
                    }
                }, {
                    text: '取 消',
                    handler: function () {
                        $("#ui_Document_add_dialog").dialog('destroy');
                    }
                }],
                onLoad: function () {
                    $("#txtDocumentName").focus();
                    //设置设备下拉列表
                    $('#selDocumentType').combobox({
                        prompt: '',
                        required: false,
                        url: '/Document/GetDocumentType',
                        editable: true,
                        hasDownArrow: true
                    });
                    $("#selDocumentType").combobox({ editable: false });

                    $('#uploadFile').bind('click', function () {
                        $('#DevuploadFileImg').show();
                        $('#DevuploadFile').hide();
                        //// file对象
                        //var file = $('#fileImport').files[0];
                        ////判断控件中是否存在文件内容，如果不存在，弹出提示信息，阻止进一步操作
                        //if (file == null) { alert('错误，请选择文件'); return; }

                        ////获取文件名称
                        //var fileName = file.name;
                        ////获取文件类型名称
                        //var file_typename = fileName.substring(fileName.lastIndexOf('.'), fileName.length);
                        var p = $("#importFileForm");
                        //获取form数据
                        var formData = new FormData(p[0]);

                        $.ajax({
                            url: "/Document/UploadFile",
                            type: 'POST',
                            data: formData,
                            async: false,
                            cache: false,
                            contentType: false,
                            processData: false,
                            success: function (data) {
                                //alert(data);
                                var dataJson = eval(  data );
                                //alert(data);
                                if (data.Path == '1')
                                {
                                    $('#DevuploadFileImg').hide();
                                    $('#DevuploadFile').show();
                                    alert('文件已存在！');
                                    return;
                                }
                                //alert(dataJson.Path);
                                //if (returnInfo == '3') {
                                //    $('#DevuploadFileImg').hide();
                                //    $('#DevuploadFile').show();
                                //    alert('文件大小超出限制！');
                                //    return;
                                //}
                                $('#DevuploadFileImg').hide();
                                $('#DevuploadFile').show();
                                //var PathS = returnInfo.split(",");

                                //alert(dataJson);
                                //alert(dataJson.Path);
                                //alert(dataJson.DownloadUrl);
                                $("#txtPath").val(dataJson.Path);
                                $("#txtDownloadUrl").val(dataJson.DownloadUrl);
                                alert('上传成功');
                            },
                            error: function (returnInfo) {
                                $('#DevuploadFile').show();
                                $('#DevuploadFileImg').hide();
                                alert('上传失败');
                            }
                        });

                    });

                },
                onClose: function () {
                    $("#ui_Document_add_dialog").dialog('destroy');  //销毁dialog对象
                }
            });
        }

        //修改资料关系
        function EditDocument() {
            var rows = $("#ui_Document_dg").datagrid("getSelected");
            if (rows==null) {
                $.show_alert("提示", "请先选择修改的资料");
                return;
            }
            if (rows.length > 1) {
                $.show_alert("提示", "不支持批量修改");
                $("#ui_Document_dg").datagrid('clearSelections').datagrid('clearChecked');
                return;
            }
            var DocumentId = rows.DocumentId;
            $("<div/>").dialog({
                id: "ui_Document_edit_dialog",
                href: "/Document/DocumentEdit?DocumentId=" + DocumentId,
                title: "修改资料信息",
                height: 570,
                width: 910,
                modal: true,
                buttons: [{
                    id: "ui_Document_edit_btn",
                    text: '修 改',
                    handler: function () {
                        var IsSecrecy = "";
                        if ($("input[name='IsSecrecy']:checked").val() == '1') {
                            IsSecrecy = '1';
                        }
                        if ($("#selDocumentType").val() == '') {
                            alert('请选资料类型');
                            return false;
                        }
                        //alert(IsSecrecy);
                        $("#DocumentEditForm").form("submit", {
                            url: "/Document/DocumentInfoEdit",
                            onSubmit: function (param) {

                                param.DocumentId = $('#DocumentId').val();
                                param.DocumentTypeId = $('#selDocumentType').val();
                                param.DocumentName = $("#txtDocumentName").val();
                                param.Path = $("#txtPath").val();
                                param.DownloadUrl = $("#txtDownloadUrl").val();
                                param.IsSecrecy = IsSecrecy;
                                if ($(this).form('validate')) {
                                    $('#ui_Document_edit_btn').linkbutton('disable');
                                    return true;
                                }
                                else {
                                    $('#ui_Document_edit_btn').linkbutton('enable');   //恢复按钮
                                    return false;
                                }
                            },
                            success: function (data) {
                                var dataJson = eval('(' + data + ')');
                                if (dataJson.success) {
                                    $("#ui_Document_edit_dialog").dialog('destroy');
                                    $.show_alert("提示", dataJson.msg);
                                    $("#ui_Document_dg").datagrid("reload").datagrid('clearSelections').datagrid('clearChecked');
                                } else {
                                    $('#ui_Document_edit_btn').linkbutton('enable');
                                    $.show_alert("提示", dataJson.msg);
                                }
                            }
                        });
                    }
                }, {
                    text: '取 消',
                    handler: function () {
                        $("#ui_Document_edit_dialog").dialog('destroy');
                    }
                }],
                onLoad: function () {
                    $("#txtDocumentName").focus();
                    $('#uploadFile').bind('click', function () {
                        $('#DevuploadFileImg').show();
                        $('#DevuploadFile').hide();
                        //// file对象
                        //var file = $('#fileImport').files[0];
                        ////判断控件中是否存在文件内容，如果不存在，弹出提示信息，阻止进一步操作
                        //if (file == null) { alert('错误，请选择文件'); return; }

                        ////获取文件名称
                        //var fileName = file.name;
                        ////获取文件类型名称
                        //var file_typename = fileName.substring(fileName.lastIndexOf('.'), fileName.length);
                        var p = $("#importFileForm");
                        //获取form数据
                        var formData = new FormData(p[0]);

                        $.ajax({
                            url: "/Document/UploadFile",
                            type: 'POST',
                            data: formData,
                            async: false,
                            cache: false,
                            contentType: false,
                            processData: false,
                            success: function (data) {
                                //alert(data);
                                var dataJson = eval(data);
                                //alert(data);
                                if (data.Path == '1') {
                                    $('#DevuploadFileImg').hide();
                                    $('#DevuploadFile').show();
                                    alert('文件已存在！');
                                    return;
                                }
                                //alert(dataJson.Path);
                                //if (returnInfo == '3') {
                                //    $('#DevuploadFileImg').hide();
                                //    $('#DevuploadFile').show();
                                //    alert('文件大小超出限制！');
                                //    return;
                                //}
                                $('#DevuploadFileImg').hide();
                                $('#DevuploadFile').show();
                                //var PathS = returnInfo.split(",");

                                //alert(dataJson);
                                //alert(dataJson.Path);
                                //alert(dataJson.DownloadUrl);
                                $("#txtPath").val(dataJson.Path);
                                $("#txtDownloadUrl").val(dataJson.DownloadUrl);
                                alert('上传成功');
                            },
                            error: function (returnInfo) {
                                $('#DevuploadFile').show();
                                $('#DevuploadFileImg').hide();
                                alert('上传失败');
                            }
                        });

                    });
                },
                onClose: function () {
                    $("#ui_Document_edit_dialog").dialog('destroy');  //销毁dialog对象
                }
            });
        }

        //删除资料
        function DelDocument() {
            var rows = $("#ui_Document_dg").datagrid("getSelected");
            if (rows==null) {
                $.show_alert("提示", "请先选择要删除的资料");
                return;
            }
            $.messager.confirm('提示', '确定删除选中行吗？', function (r) {
                if (r) {
                    var DocumentId = rows.DocumentId;

                    $.ajax({
                        url: "/Document/DocumentDel",
                        data: {
                            DocumentId: DocumentId
                        },
                        type: "POST",
                        dataType: "json",
                        success: function (data) {
                            if (data.success) {
                                $.show_alert("提示", data.msg);
                                $("#ui_Document_dg").datagrid("reload").datagrid('clearSelections').datagrid('clearChecked');
                                $("#ui_Document_layout").layout("collapse", "south");
                            } else {
                                $.show_alert("提示", data.msg);
                            }
                        }
                    });
                }
            });
        }

        //添加资料关系
        function addDocumentRelation(DocumentId) {
            //alert(DocumentId);
            $("<div/>").dialog({
                id: "ui_DocumentRelation_add_dialog",
                href: "/Document/DocumentRelationAdd?DocumentId=" + DocumentId,
                title: "添加资料关系信息",
                height: 570,
                width: 780,
                modal: true,
                buttons: [{
                    id: "ui_DocumentRelation_add_btn",
                    text: '添 加',
                    handler: function () {

                        var tmpJson = "[";
                        var trList = $("#RelationTab tr");
                        //alert($("#RelationTab tr").length)
                        for (var i = 0; i < trList.length; i++) {
                            var tdArr = trList.eq(i).find("td");
                            var Property = tdArr.eq(1).find('input').val();//类型
                            var ID = tdArr.eq(0).find('input').val();//编号
                            var Name = tdArr.eq(2).find('input').val();//名称

                            tmpJson += "{\"Property\":\"" + Property + "\",\"ID\":\"" + ID + "\",\"Name\":\"" + Name + "\"},";

                        }
                        if (trList.length == 0) {
                            tmpJson = "";
                        }
                        else {
                            tmpJson = tmpJson.substring(0, tmpJson.length - 1);
                            tmpJson += "]";
                        }
                        //alert(tmpJson);
                        if (tmpJson == '')
                        {
                            alert('请先添加关系再点保存！');
                            return false;
                        }




                        $("#DocumentRelationAddForm").form("submit", {
                            url: "/Document/DocumentRelationInfoAdd",
                            onSubmit: function (param) {
                                param.ID = $('#DocumentId').val();

                                param.ResourcesJson = tmpJson;

                                if ($(this).form('validate')) {
                                    $('#ui_DocumentRelation_add_btn').linkbutton('disable');
                                    return true;
                                }
                                else {
                                    $('#ui_DocumentRelation_add_btn').linkbutton('enable');   //恢复按钮
                                    return false;
                                }
                            },
                            success: function (data) {
                                var dataJson = eval('(' + data + ')');
                                if (dataJson.success) {
                                    $("#ui_DocumentRelation_add_dialog").dialog('destroy');
                                    $.show_alert("提示", dataJson.msg);
                                    $("#ui_DocumentRelation_dg").datagrid("reload").datagrid('clearSelections').datagrid('clearChecked');
                                } else {
                                    $('#ui_DocumentRelation_add_btn').linkbutton('enable');
                                    $.show_alert("提示", dataJson.msg);
                                }
                            }
                        });
                    }
                }, {
                    text: '取 消',
                    handler: function () {
                        $("#ui_DocumentRelation_add_dialog").dialog('destroy');
                    }
                }],
                onLoad: function () {
                    $("#ui_Resources_dg").datagrid({       //初始化datagrid
                        url: "/Document/GetResources?DocumentId=" + DocumentId,
                        striped: true, rownumbers: true, pagination: true, pageSize: 20, singleSelect: true,
                        idField: 'ID',
                        pageList: [20, 40, 60, 80, 100],
                        toolbar: [{ text: '添加', iconCls: 'icon-add', handler: function () { addRelationTab(); } }],
                        columns: [[
                             { width: 100, title: '编号', field: 'ID', hidden: true },
                             { width: 100, title: '编号', field: 'Code' },
                             { width: 100, title: '名称', field: 'Name' },
                        ]]
                    });
                },

                onClose: function () {
                    $("#ui_DocumentRelation_add_dialog").dialog('destroy');  //销毁dialog对象
                }
            });
        }
        //删除资料关系
        function delDocumentRelation() {

            var rows = $("#ui_DocumentRelation_dg").datagrid("getSelected");
            if (rows.length < 1) {
                $.show_alert("提示", "请先选择要删除的关系");
                return;
            }
            $.messager.confirm('提示', '确定删除选中行吗？', function (r) {
                if (r) {
                    var DocumentRelationID = rows.DRelationId;
                    $.ajax({
                        url: "/Document/DocumentRelationDel",
                        data: {
                            DocumentRelationID: DocumentRelationID
                        },
                        type: "POST",
                        dataType: "json",
                        success: function (data) {
                            if (data.success) {
                                $.show_alert("提示", data.msg);
                                $("#ui_DocumentRelation_dg").datagrid("reload").datagrid('clearSelections').datagrid('clearChecked');
                            } else {
                                $.show_alert("提示", data.msg);
                            }
                        }
                    });
                }
            });
        }


        //添加项目、设备、基站到关系table中
        function addRelationTab() {
            var rows = $("#ui_Resources_dg").datagrid("getSelected");
            if (rows.length < 1) {
                $.show_alert("提示", "请先选择添加的属性");
                return;
            }
            var IDList = $('#IDList').val();
            if (IDList.indexOf(rows.Name) != -1) {
                alert('已经添加过所选项');
                return;
            }
            IDList = IDList + rows.Name + ",";
            $('#IDList').val(IDList);

            var Property = $('#selType').val();
            var PropertyName = $("#selType").find("option:selected").text();
            var trHtml = "<tr align='center'><th>编号:</th><td width='30%'><input type='text' style='width:80px;height:22px;' value='" + rows.ID + "' disabled='disabled' /></td><th>类型</th><td><input type='hidden'  id='Property' value='" + Property + "'><input type='text' style='width:80px;height:22px;'value='" + PropertyName + "' disabled='disabled'/></td><th>名称</th><td><input type='text' style='width:80px;height:22px;'value='" + rows.Name + "' disabled='disabled'/></td><td><input type='button' onclick='DleTr(this,\"" + rows.Name + "\")' value='删除'></td></tr>";
            //$("#LocaManagerTabl").after(trHtml);
            //$("#LocaManagerTabl tr:eq(0)").after(trHtml);
            $('#RelationTab').append(trHtml);
        }
        //删除行
        function DleTr(obj, Name) {
            //alert(Name);
            var IDList = $('#IDList').val();
            $('#IDList').val(IDList.replace(Name + ',', ''));
            $(obj).parent().parent().remove();
        }


        //关系页资源搜索
        function ui_DocumentRelation_searchdata() {
            $("#ui_Resources_dg").datagrid('load', {
                DocumentId: $('#DocumentId').val(),
                ID: $('#txtID').val(),
                Name: $('#txtName').val(),
                Type: $('#selType').val(),

            });
            $("#ui_Resources_dg").datagrid('clearSelections').datagrid('clearChecked');
        }
        //主搜索
        function ui_Dev_searchdata() {

            $("#ui_Document_dg").datagrid('load', {
                selDocumentName: $('#selDocumentName').val(),

            });
            $("#ui_Document_dg").datagrid('clearSelections').datagrid('clearChecked');
        }
        //清空搜索
        function ui_Dev_cleardata() {
            $('#selDocumentName').val('');

            $("#ui_Document_dg").datagrid('clearSelections').datagrid('clearChecked');
        }

        //时间转换
        function getTime(/** timestamp=0 **/) {
            var ts = arguments[0] || 0;
            var t, y, m, d, h, i, s;
            t = ts ? new Date(ts * 1000) : new Date();
            y = t.getFullYear();
            m = t.getMonth() + 1;
            d = t.getDate();
            h = t.getHours();
            i = t.getMinutes();
            s = t.getSeconds();
            // 可根据需要在这里定义时间格式
            return y + '-' + (m < 10 ? '0' + m : m) + '-' + (d < 10 ? '0' + d : d) + ' ' + (h < 10 ? '0' + h : h) + ':' + (i < 10 ? '0' + i : i) + ':' + (s < 10 ? '0' + s : s);
        }


        //显示当前日期
        formatterDate = function (date) {
            var day = date.getDate() > 9 ? date.getDate() : "0" + date.getDate();
            var month = (date.getMonth() + 1) > 9 ? (date.getMonth() + 1) : "0"
            + (date.getMonth() + 1);
            var hor = date.getHours();
            var min = date.getMinutes();
            var sec = date.getSeconds();
            return date.getFullYear() + '-' + month + '-' + day + " " + hor + ":" + min + ":" + sec;
        };

        function loadImage(img) {
            var filePath = img.value;
            var fileExt = filePath.substring(filePath.lastIndexOf("."))
                .toLowerCase();

            if (!checkFileExt(fileExt)) {
                alert("您上传的文件格式不正确,请重新上传！");
                img.value = "";
                return;
            }


            if (img.files && img.files[0]) {
                //                alert(img);
                //                alert(img.files[0])
                //alert('你选择的文件大小' + (img.files[0].size / 1024).toFixed(0) + "kb");
                //                var xx = img.files[0];
                //                for (var i in xx) {
                //                    alert(xx[i])
                //                }
                if((img.files[0].size / 1024)>15360)
                {
                    $("#fileImport").val('');
                    alert('上传的文件超出限制，无法上传！');
                }
            } else {
                img.select();
                var url = document.selection.createRange().text;
                try {
                    var fso = new ActiveXObject("Scripting.FileSystemObject");
                } catch (e) {
                    alert('如果你用的是ie8以下 请将安全级别调低！');
                }
                alert("文件大小为：" + (fso.GetFile(url).size / 1024).toFixed(0) + "kb");
            }

        }
        function checkFileExt(ext) {
            if (!ext.match(/.doc|.docx|.xls|.xlsx|.pdf|.jpg|.png/i)) {
                return false;
            }
            return true;
        }


    </script>
    <script type="text/javascript">

            function uploadPic(){
                if($("#file").val()==""){
                    $.messager.alert("提示","请选择文件夹");
                    return false;
                }
                 $("#p").ajaxSubmit({
                    type:"post",  //提交方式
                    url: "/Document/UploadFile", //请求url
                    success:function(data){ //提交成功的回调函数
                        $.messager.alert("提示",data);
                    }
                });
            }
    </script> 
        </head>
        <body>
            <div id="ui_Document_layout" class="easyui-layout" data-options="fit:true,border:false">
                <div data-options="region:'north',split:true,border:true,collapsed:false" title="搜索条件" style="height:74px;">
                    <div id="ui_user_search">
                        <table class="tableForm" style="width: 99%; height: 100%; background: #F5F5F5;">
                            <tr>
                                <th>
                                    资料名称：
                                </th>
                                <td>
                                    <input name="selDocumentName" id="selDocumentName" class="easyui-validatebox textbox" style="width:120px;height:22px;" />
                                </td>
                                <td>
                                    <a href="javascript:void(0);" class="easyui-linkbutton" iconcls="icon-search" plain="true"
                                       onclick="ui_Dev_searchdata();">搜索</a>
                                    <a href="javascript:void(0);" class="easyui-linkbutton" iconcls="icon-clear" plain="true"
                                       onclick="ui_Dev_cleardata();">清空条件</a>
                                </td>
                            </tr>
                        </table>
                    </div>
                </div>
                <div data-options="region:'south',split:true,border:true,collapsed:true" title="资料关系信息"
                     style="width: 480px;height:350px">
                    <table id="ui_DocumentRelation_dg" data-options="fit:true,border:false"></table>
                </div>
                <div data-options="region:'center',border:false">
                    <table id="ui_Document_dg" data-options="fit:true,border:false"></table>
                </div>
            </div>
        </body>
        </html>
